package com.lhcai.test;

import java.util.Scanner;

/**
 * @author lhcstart
 * @create 2023-02-22 17:22
 */
public class HJ3 {
    public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
        while (sc.hasNext()){
            String s = sc.nextLine();
            String s1 = s.replace("0x", "");
            int i = Integer.parseInt(s1, 16);
            System.out.println(i);

        }
    }
}
